<?php

namespace App\Models;

use App\Libs\DataFormat;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class UserCollection extends Model
{

    use DataFormat;

    protected $table = 'user_collection';
    protected $dates = [''];

    protected $guarded = ['id', 'created_at'];
    protected $fillable = ['user_id', 'relation_id', 'type',];

    public function project()
    {
        return $this->hasOne('App\Models\Project', 'id', 'relation_id');
    }


    public function team()
    {
        return $this->hasOne('App\Models\Team', 'id', 'relation_id');
    }

}
